package ifSwitchPlugins;

import java.awt.Color;

import javax.swing.JOptionPane;

public class IfElseAge {

	private Color c;
	String ageStr = JOptionPane.showInputDialog(null, "How old are you?");
	int age = Integer.parseInt(ageStr);

	public Color ageAndHeight(int age, int height){
		if (age < 24) {
			if (height > 200) 
				c = Color.RED;
			else
				c = Color.BLUE;
		}
		return c;
	}

	public void showDialog(){
		if (age > 120 || age < 0)
			System.out.println("I think you're lying about your age!");
		if (ageStr instanceof String)
			System.out.println("ageStr e un String");
	}
}
